package org.iweb.html.impl.widget;

import java.util.UUID;

import org.iweb.html.api.AbstractWidget;
import org.iweb.html.impl.basic.Input;


public class DatePicker extends AbstractWidget {

	private static final long serialVersionUID = 7112516710582817740L;
	private Input input;
	
	public DatePicker() {
		append(getInput());
		//new JScript().setScript("$.datepicker.setDefaults($.datepicker.regional[\"it\"]);");
	}
	
	public Input getInput(){
		if(input==null)
			input=new Input(Input.TYPE_TEXT,UUID.randomUUID().toString(), "");
		return input;
	}

	@Override
	protected String getWidgetId() {
		return getInput().getId();
	}
}
